package com.sy.pet.controller.client;

import com.sy.pet.commom.ResultBean;
import com.sy.pet.dto.PetAdoptionRecordDTO;
import com.sy.pet.dto.UserAuthenticationDTO;
import com.sy.pet.service.PetAdoptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Author: liangSY
 * @Date: 2024/9/16
 * @ClassName: PetAdoptionClientContoller
 * @Description: PetAdoptionClientContoller描述
 */
@RequestMapping("/client/adoption")
@RestController
public class PetAdoptionClientController {


    @Autowired
    PetAdoptionService petAdoptionService;

    @PostMapping
    private ResultBean<String> apply(@RequestBody @Valid PetAdoptionRecordDTO dto){
        petAdoptionService.addPetAdoptionRecord(dto);
        return ResultBean.success();
    }
}
